-- GENERATED SPELL FOR [Gath'Ilzogg] --


function spell0_334(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_334', 540, 1)
end

function spell1_334(pUnit, Event) --@Infected Wound,n/a--
pUnit:FullCastSpellOnTarget(3427,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_334', 30315, 1)
end

function spell2_334(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_334', 8253, 1)
end

function Sorts_334(pUnit, Event)
local choix_sorts_334 = math.random(0, 2)
if choix_sorts_334 == 0 then
pUnit:RegisterEvent('spell0_334', 1, 1)
end
if choix_sorts_334 == 1 then
pUnit:RegisterEvent('spell1_334', 1, 1)
end
if choix_sorts_334 == 2 then
pUnit:RegisterEvent('spell2_334', 1, 1)
end
end

function mob334_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_334', math.random(1500, 3000), 1)
end

function mob334_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob334_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob334_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(334, 1, 'mob334_Action')
RegisterUnitEvent(334, 2, 'mob334_Leave')
RegisterUnitEvent(334, 3, 'mob334_Kill')
RegisterUnitEvent(334, 4, 'mob334_Die')
